
<template>
  <view>
  
   
  
     
	<!-- <text>交易密码：{{bankCards.tradepassword}}</text>
	<br> -->
	<text>可用金额：{{bankCards.usableamount}}</text>
	<br>
	<text>冻结资金：{{bankCards.freezedamount}}</text>
	<br>
	<text>借款限额金额：{{bankCards.borrowlimitamount}}</text>
	<br>
	<text>未收利息：{{bankCards.unreceiveinterest}}</text>
	<br>
	<text>未收本金：{{bankCards.unreceiveprincipal}}</text>
	<br>
	<text>未换金额：{{bankCards.unreturnamount}}</text>
	<br>
	<text>剩余借款额度：{{bankCards.remainborrowlimit}}</text>
	
	<!-- <u-button type="success" @click="addbank">添加银行卡</u-button> -->
  </view>
</template>
<script>
// import token from '@/common/token/token.js'
	
export default {
	
  data() {
	
    return {
		
      bankCards: {} ,// 银行卡信息数组
	  form:{
		  id:'0'
	  }
    };
  },
  methods: {
    fetchBankCards() {
			 console.log("id----"+uni.getStorageSync('userid'));
			
			this.$api({
			  method: 'post',
			  url: `/system/account/getAccountByIdName/${this.form.id}`,
			  data: this.form,
			
			}).then(res => {
				// console.log(res.data);
			  this.bankCards = res.data;
			  console.log(this.bankCards);
			}).catch(err => {
			  console.log(err);
			});
			 
    }
  },
  mounted() {
	this.form.id = uni.getStorageSync('userid');
    // 在组件加载完成后调用fetchBankCards方法获取数据
    this.fetchBankCards();
  }
};
</script>

<style lang="scss">
	
</style>
